import { defineStore } from "pinia"
import { ref } from 'vue'

// 定义文章相关内容pinia
export const useUserInfoStore = defineStore('article', () => {
    //1.定义用户信息
    const article = ref({})
    //2.定义修改用户信息的方法
    const set = (newInfo) => {
        article.value = newInfo
    }
    //3.定义清空用户信息的方法
    const remove = () => {
        article.value = {}
    }

    return { article, set, remove }
}, {
    persist: true
})